package views;

import java.util.List;

import logic.Answer;
import android.content.Context;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.ArrayAdapter;
import android.widget.RadioButton;
import android.widget.RadioGroup;
import android.widget.TextView;

import com.evaluity.R;

public class AnswerAdapter extends ArrayAdapter<Answer> {
	List<Answer> answers;
	
	public AnswerAdapter(Context context, int textViewResourceId, List<Answer> answers) {
		super(context, textViewResourceId, answers);
		this.answers = answers;
	}

	@Override
	public View getView(int position, View convertView, ViewGroup parent) {
//		ImageView icon = (ImageView) convertView.findViewById(R.id.row_icon);
//		icon.setImageResource(getItem(position).iconRes);
		if (convertView == null) {
			convertView = LayoutInflater.from(getContext()).inflate(R.layout.answer_row, null);
		}
		
//		RadioGroup g = (RadioGroup) convertView.findViewById(R.id.rad)
//		
//		RadioButton title = (RadioButton) convertView.findViewById(R.id.radioButton1);
//		title.setText(getItem(position).getText());

		return convertView;
	}
}
